<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="/index.css">
    <link rel="stylesheet" href="/css/footer.css">
</head>
<body>
<!-- 绑定数据 -->
<div><%= title %></div>

<!-- 绑定对象 -->
<div>
    <span>姓名：<%= userInfo.name %></span>
    <span>年龄：<%= userInfo.age %></span>
</div>

<!-- 绑定html -->
<div><%= htmlStr %></div>
<div><%- htmlStr %></div>

<!-- 条件判断 -->
<% if(flag) { %>
    <span>flag=true</span>
<% } %>
<br>
<% if(score < 60){ %>
    <span>不及格</span>
<% } else if (score >= 60 && score < 80 ){ %>
    <span>及格</span>
<% } else { %>
    <span>优秀</span>
<% } %>

<!-- 循环列表 -->
<ul>
    <% for(let i = 0, len = list.length; i < len; i ++) { %>
        <li>
            <span><%= list[i].id %></span>
            <span><%= list[i].title %></span>
        </li>
    <% } %>
</ul>

<!-- 引入外部ejs文件 -->
<%- include('footer.html') %>
</body>
</html>